﻿@using Copperfield.Demo.Common

@model Copperfield.Demo.Common.SignContext

@{
    ViewBag.Title = "Index";
}

<h2>Set the Values of the Sign Context</h2>

@using (Html.BeginForm())
{
    <table align="center">
        <tr>
            <th>
                &nbsp;Sign Color&nbsp;
            </th>
            <td>
                @Html.DropDownListFor(x => x.Color,
         new SelectList(Enum.GetValues(typeof(SignColor)).OfType<SignColor>().Select(x => new SelectListItem { Text = x.ToString(), Value = x.ToString() })
  , "Value", "Text", Model.Color),
         new { style = "width: 155px; text-align: central" })
            </td>
        </tr>
        <tr>
            <th>
                &nbsp;Sign Shape&nbsp;
            </th>
            <td>
                @Html.DropDownListFor(x => x.Shape,
                new SelectList(Enum.GetValues(typeof(SignShape)).OfType<SignShape>().Select(x => new SelectListItem { Text = x.ToString(), Value = x.ToString() })
   , "Value", "Text", Model.Shape),
                 new { style = "width: 155px; text-align: central" })
            </td>
        </tr>
        <tr>
            <th>
                &nbsp;Sign Text&nbsp;
            </th>
            <td>
                @Html.DropDownListFor(x => x.Text,
                new SelectList(SignText.Values().Select(x => new SelectListItem{Text = x.ToString(), Value = x.ToString()})
         , "Value", "Text", Model.Text), 
                new { style="width: 155px; text-align: central" })
            </td>
        </tr>
    </table>
    <p align="center">
        <input type="submit" value="See Your Sign" />
    </p>
}